onMotion

abstract fun onMotion()

Called when motion has been detected by an associated motion sensor.

This callback indicates that a motion event has occurred. It does not provide specific data about the motion itself (e.g., intensity, direction, or location); it serves as a simple trigger indicating activity.

Implementers can use this notification to perform actions such as:

  • Activating the screen or increasing brightness.
  • Starting or changing displayed content.
  • Sending an alert or logging the event.
Note: The frequency of these callbacks may depend on the motion sensor's configuration and the sensitivity of the detection system. Implementers should consider if any debouncing logic is needed within their own code if rapid, successive events are undesirable, though the dispatching component may already handle this.